#include <bits/stdc++.h>
using namespace std;
#define int long long
void solve()
{
    string s;
    cin>>s;
    int l=0,r=s.size()-1;
    while(l<r-1)
    {
        //cout<<s.substr(l+1)<<endl<<s.substr(0,r)<<endl<<endl;
        //string a=s.substr(l+1),b=s.substr(0,r),c=s.substr(0,l+1),d=s.substr(r);
        if(s.substr(l+1)==s.substr(0,r))
        {
            cout<<"YES"<<endl<<s.substr(l+1);
            return ;
        }
        l++,r--;
    }
    cout<<"NO"<<endl;
}
signed main()
{
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int T=1;
    //cin>>T;
    while(T--)
    {
       solve();
    }
    return 0;
}